<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        /* boolean-number
        Number()  1.只能识别纯数字的字符串  2.只能识别纯boolean类型
         */
         var t=true;
         var f=false;
         var str="true"
         console.log(Number(t)) //1
         console.log(Number(f))  //0
         console.log(Number(str)) //nan
    </script>
</body>
</html>